<?php
use \think\Route;
Route::get('/','index/Index/index');
Route::miss(function(){
    echo json_encode(['code' => -2,'msg' => '请求错误,请检查路由!','data' => []]);exit;    
});
//后台
Route::group('admin',function(){
    Route::post('login','index/AdminController/login');             //登录
    Route::post('prize','index/AdminController/prizelist');         //奖品列表
    Route::post('edit','index/AdminController/editDate');           //编辑时间
    Route::post('user','index/AdminController/userlist');           //用户列表
    Route::post('draws','index/AdminController/drawslist');         //中奖列表
    Route::post('export','index/AdminController/export');           //下载中奖列表
});
//前台
Route::group('api',function(){
    Route::post('info','index/ApiController/info');                 //获取活动信息
    Route::post('draw','index/ApiController/draw');                 //抽奖
    Route::post('add','index/ApiController/add');                   //提交地址信息
});
